/*
 * the codes was writted by taing, but you can copy or moidfy it
 */

package com.taing.autosql.service;

import com.taing.autosql.dao.IDataSqlDao;
import com.taing.autosql.model.DataSqlModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author tianyi
 * @Description 操作auto_sql_t表的数据（使用jpa）
 * @Date 2023 - 01 - 30
 **/
@Service
public class DataSqlServiceImpl implements IDataSqlService {
    @Autowired
    IDataSqlDao dataSqlDao;

    @Override
    public DataSqlModel findDataSqlByMethod(String method) {
        return dataSqlDao.findDataSqlModelByMethod(method);
    }

    @Override
    public DataSqlModel saveDataSql(DataSqlModel dataSqlModel) {
        return dataSqlDao.save(dataSqlModel);
    }
}
